package com.yangmin.springcloud.controller;

import com.yangmin.springcloud.entities.CommonResult;
import com.yangmin.springcloud.entities.Payment;
import com.yangmin.springcloud.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PaymentController {
    @Autowired
    PaymentService paymentService;

    @GetMapping("/comsumer/feign/get/{id}")
    CommonResult<Payment> getPaymentByID(@PathVariable("id") Long id) {
        return paymentService.getPaymentByID(id);
    }
}
